package org.ffmpeg.ohos.filters;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;

public abstract class VideoFilter {

	public abstract String getFilterString () throws IOException;

	public static String format (ArrayList<VideoFilter> listFilters) throws IOException {
		StringBuffer result = new StringBuffer();

		Iterator<VideoFilter> it = listFilters.iterator();
		VideoFilter vf;

		while (it.hasNext())
		{
			vf = it.next();
			result.append(vf.getFilterString());

			if (it.hasNext())
				result.append(",");
		}
		return result.toString();
	}
}
